package com.anrongtec.zcpt.openapi.interfaces;

/**
 * url地址类
 * 
 * @author cxy
 *
 */
public class ShuJuURL {

	private static final String TAG = "url";

	public static final String REQUEST_TAG = "ua-manager";

	public static class Param {
		public static final String BUSCODE = "busCode";
		public static final String PKG = "pkg";// 包名
		public static final String SHA1CODE = "sha1Code";// sha1码
		public static final String APPKEY = "appKey";// sha1码
		public static final String IMEI = "imei";// Imei码
		public static final String DEVICEID = "deviceId";// 唯一标识
		public static final String TOKEN = "token";// 返回的应用Token
		public static final String ACCESSTOKEN = "accessToken";// 用户认证过的Token
		public static final String IDNO = "idno";// 身份证号

	}

	public static String JieKou_URL() {
		String string = "http://" + getIP() + ":" + getPOST();
		// LogUtil.trace(Log.DEBUG, TAG, string);
		return string;
	}

	public static String getIP() {
		// return "211.149.198.196";
		// return "192.168.3.124";
		// return "192.168.3.223";
		// return "192.168.0.105";
		// return "10.148.68.72";//广西 三类
		// return "20.124.143.20";// 广西 二类
//		return "192.168.6.50";//
		return "20.25.0.94";// 吉林 二类
		// return "192.168.200.106";

	}

	public static int getPOST() {
		 return 18080;
//		return 8780;
	}

	public static class BusCode {
		public static final String LOGIN = "0000";
	}

	public static class RetCode {
		/** 成功 */
		public static final String SUCCESS = "0000";
		/** 参数错误 */
		public static final String PARAM_ERROR = "0001";
		/** 业务处理错误,具体看信息描述 */
		public static final String BUSINESS_ERROR = "0002";
		/** 登录超时,重新登录 */
		public static final String TIMEOUT_ERROR = "2222";
		/** 后台服务异常 */
		public static final String SERVICE_ERROR = "9999";
	}

	/**
	 * app验证是否具备统一认证权限的URL，属于登录
	 * 
	 * @return
	 */
	public static String getAPPOauthURL() {
		return JieKou_URL() + "/support-store/oauth";
	}

	/**
	 * 功能应用标识
	 * 
	 * @author dongtianhao
	 *
	 */
	public static class ServerID {
		public static final String VERSION = "V1-0";
		// 应用认证，获取认证权限
		public static final String AUTH = "UA-" + VERSION + "-1001";
		// 验证应用权限/刷新Token
		public static final String REFRESH = "UA-" + VERSION + "-1002";
		// 登出
		public static final String LOGOUT = "UA-" + VERSION + "-1003";
		// 获取AccessToken，绑定AccessToken和用户，设备，应用
		public static final String REFRESHACCESSTOKEN = "UA-" + VERSION + "-1004";
		// 获取用户信息
		public static final String STAFFINFO = "UA-" + VERSION + "-1005";
	}

}
